private _detectCompleted() { var loadingFromPersistence = this._persistence && this._persistence.editedUTC > this._domStorage.editedUTC;
var sourceLoad = loadingFromPersistence ? this._persistence : this._domStorage;
var targetLoad = loadingFromPersistence ? this._domStorage : this._persistence;
this._callbacks.detectionComplete(
targetLoad ? true : false);
var byFullPath: { [fullPath: string]: { [property: string]: string; }; } = {}; file: (fullPath: string, values: { [name: string]: string; }) => { byFullPath[fullPath] = values;
this._callbacks.loadProgress(loadedFileCount, fullPath);
completed: (sourceUpdater: storage.attached.UpdateStorage) => { this._callbacks.loadComplete();
targetLoad.migrate(sourceLoad.editedUTC, byFullPath, (err, targetupdater) => { this._callbacks.loadComplete();
failed: (error: Error) => { this._callbacks.loadComplete();
this._callbacks.detectionComplete('dom', this._domStorage.editedUTC, false); export module StorageLoader { export interface Callbacks { supportsPersistence: boolean): void;